﻿using System;
using System.Collections.Generic;

namespace YJKRevitColumn.DataDefine
{
	public class StringComparer : IComparer<string>
	{
		public int Compare(string str1, string str2)
		{
			if (str1 == "当前层高")
			{
				return -1;
			}
			if (str2 == "当前层高")
			{
				return 1;
			}
			int result;
			try
			{
				result = Convert.ToInt32(str1);
				result = result.CompareTo(Convert.ToInt32(str2));
			}
			catch
			{
				result = 0;
			}
			return result;
		}
	}
}
